package com.cscp.javastudy.designpattern.prototype.demo1;

import java.util.Date;

public class Client {

    public static void main(String[] args) throws CloneNotSupportedException {

        // 原型对象
        Date date = new Date();
        Vedio v1 = new Vedio("whereisjava", date);
        System.out.println("v1 -> " + v1);
        System.out.println("v1 Hash -> " + v1.hashCode());

        Vedio v2 = (Vedio)v1.clone();// 浅克隆
        v2.setName("I am changed");
        System.out.println("v2 -> " + v2);
        System.out.println("v2 Hash -> " + v2.hashCode());



    }

}
